const express        = require('express');
const app            = express();
var cors = require('cors');
const port = 8000;

var multer  = require('multer')
var upload = multer({ dest: './uploads/' })


app.use(cors());
app.post('/uploadfile', upload.single('file'), function (req, res, next) {
    // req.file is the `avatar` file
    // req.body will hold the text fields, if there were any
    req;
    res.send("hi")
})

app.listen(port, ()=>{console.log(`${port}: ok!`)})